/**
 *  Copyright (C) 2008-2009  The Aceituna Project Team
 *  Portions of this code are Copyright(C) 2002-2007  The FreeCol Team (www.freecol.org).
 *
 *  This file is part of Aceituna Project.
 *
 *  Aceituna Project is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  Aceituna Project is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with Aceituna Project.  If not, see <http://www.gnu.org/licenses/>.
 */
package com.aceitunaproject.mapdisplay.model;


import com.aceitunaproject.mapdisplay.model.map.tile.Tile;


/**
 * Represents all things that can be seen over a Tile on the map-board. This includes:
 * Units, Cities, etc.
 */
public class Thing extends ModelObject {

	/**
	 * The thing type.
	 */
	private String thingType = null;
	private Tile currentTile;

	/**
	 * Initiate a new Thing of a specified type.
	 * The {@link Location} is set to <i>null</i>.
	 * 
	 @param type
	 *            The type of the Thing.
	 */
	public Thing(String thingType) {
		this.thingType = thingType;
	}

	/**
	 * @return the currentTile
	 */
	public Tile getCurrentTile() {
		return currentTile;
	}

	/**
	 * @param currentTile the currentTile to set
	 */
	public void setCurrentTile(Tile currentTile) {
		this.currentTile = currentTile;
	}

	
	/**
	 * Returns the type of a thing.
	 * 
	 * @return The given thing type as a String
	 */
	public String getType() {

		return thingType;

	}

	/**
	 * Set the Type value.
	 * 
	 * @param newType
	 *            The new Type value.
	 */
	public void setType(String newType) {
		if (thingType != null && newType.equals("")) {
			this.thingType = null;
		} else {
			this.thingType = newType;
		}
	}

	
	
	

}
